package tedu.study.ooday03;
//引用类型数组的演示
public class RefArrayDemo {
    public static void main(String[] args) {
        Student[] stus = new Student[3];
        stus[0] = new Student("zhangsan",18,"HN");
        stus[1] = new Student("lisi",21,"SH");
        stus[2] = new Student("wangwu",31,"TJ");
        /*System.out.println(stus[0].name);
        stus[1].age = 29;
        stus[2].sayHi();*/
        for(int i=0;i<stus.length;i++){
            System.out.println(stus[i].name);
            stus[i].sayHi();
        }
    }
}
